<ul class="list-group list-group-flush">
    @foreach($replies as $reply)
    <li class="list-group-item d-flex align-items-center" id="reply{{$reply->id}}">
        <a href="{{route('users.show',$reply->user->id)}}" class="flex-shrink-0">
          @include('shared._avatar',['avatar'=>$reply->user->avatar,'width'=>50,'is_border'=>'show'])
        </a>
        <section class="px-2 flex-grow-1">
            <small class="text-muted">
                <span >
                    <i class="fa-regular fa-user"></i>
                    <a class="text-decoration-none" href="{{route('users.show',$reply->user->id)}}">{{$reply->user->name}}</a>
                </span>

                <span>&nbsp;•&nbsp;</span>
                <span>
                    <i class="fa-regular fa-clock"></i>
                <span>{{$reply->created_at->diffForHumans()}}</span>
                </span>
            </small>
            <div class="text-success">{!! $reply->content !!}</div>
        </section>
       @can('destroy',$reply)
        <form action="{{route('replies.destroy',$reply->id)}}" method="POST"
              class="text-secondary small"
              style="min-width: max-content;"
              onsubmit="return confirm('您确定要删除该评论吗?')"
        >
            @csrf
            {{method_field('DELETE')}}
            <button type="submit" class="btn btn-default btn-sm">
                <i class="fa-solid fa-trash-can text-secondary"></i>
            </button>
        </form>
      @endcan
    </li>
    @endforeach
</ul>
